<!DOCTYPE html>
<html style="height: 100%">
   <head>
       <meta charset="utf-8">
   </head>
   <body style="height: 100%; margin: 0">
       <div id="container" style="height: 100%"></div>
       <script src="https://cdn.staticfile.org/echarts/4.4.0-rc.1/echarts.js"></script>
       <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/echarts-gl/echarts-gl.min.js"></script>
       <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/echarts-stat/ecStat.min.js"></script>
       <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/echarts/extension/dataTool.js"></script>
       <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/echarts/map/js/china.js"></script>
       <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/echarts/map/js/world.js"></script>
       <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=KOmVjPVUAey1G2E8zNhPiuQ6QiEmAwZu&__ec_v__=20190126"></script>
       <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/echarts/extension/bmap.min.js"></script>
       <script type="text/javascript" src="https://www.echartsjs.com/examples/vendors/simplex.js"></script>
       <script type="text/javascript">
var dom = document.getElementById("container");
var myChart = echarts.init(dom);
var app = {};
option = null;
option = {
    // title : {
    //     text: '某站点用户访问来源',
    //     subtext: '纯属虚构',
    //     x:'center'
    // },
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    // legend: {
    //     orient: 'vertical',
    //     left: 'left',
    //     data: ['移动端','PC端','小程序']
    // },
    series : [
        {
            name: '用户来源',
            type: 'pie',
            radius : '55%',
            center: ['50%', '60%'],
            data:[
                {value:135, name:'移动端'},
                {value:310, name:'PC端'},
                {value:434, name:'小程序'},
            ],
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            },
            label:{
                
            }
        }
    ],
    color:['rgb(255,135,64)','rgb(255,222,29)','rgb(79,197,136)']
};

if (option && typeof option === "object") {
    myChart.setOption(option, true);
}
       </script>
   </body>
</html>